/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.pojo.sqlServer;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* @website https://eladmin.vip
* @description /
* @author xinglin
* @date 2024-08-03
**/
@Entity
@Data
@Table(name="pp_move_mission")
public class PPMoveMission implements Serializable {

    @Id
    @Column(name = "`id`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "`mission_code`")
    @ApiModelProperty(value = "任务编码")
    private String missionCode;

    @Column(name = "`priority`")
    @ApiModelProperty(value = "优先级")
    private Integer priority;

    @Column(name = "`mission_status`")
    @ApiModelProperty(value = "任务状态")
    private Integer missionStatus;

    @Column(name = "`pallet_code`")
    @ApiModelProperty(value = "载盘编码")
    private String palletCode;

    @Column(name = "`source`")
    @ApiModelProperty(value = "起点")
    private String source;

    @Column(name = "`destination`")
    @ApiModelProperty(value = "终点")
    private String destination;

    @Column(name = "`create_time`")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @Column(name = "`start_time`")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;

    @Column(name = "`finish_time`")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime finishTime;

    public void copy(PPMoveMission source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
